import request from '@/utils/request'

export function create(data) {
  return request({
    url: '/api/v1/MaterialInspectionForm/Create',
    method: 'post',
    data
  })
}

export function deleteRecord(data) {
  return request({
    url: '/api/v1/MaterialInspectionForm/Delete',
    method: 'delete',
    data
  })
}
export function repeal(data) {
  return request({
    url: '/api/v1/MaterialInspectionForm/repeal',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/api/v1/MaterialInspectionForm/Update',
    method: 'post',
    data
  })
}

export function getList(data, pagination) {
  if (pagination) {
    data["pageIndex"] = pagination.pageIndex;
    data["pageSize"] = pagination.pageSize;
  }
  return request({
    url: '/api/v1/MaterialInspectionForm/GetList',
    method: 'get',
    params: data
  })
}
export function get(data) {
  return request({
    url: '/api/v1/MaterialInspectionForm/Get',
    method: 'get',
    params: data
  })
}
// 导出word
export const ExportWord = data => request.post('/api/v1/MaterialInspectionForm/ExportWord', data);
export const DownloadExportWordZip = params => request('/api/v1/MaterialInspectionForm/DownloadExportWordZip', { params: params, responseType: 'blob' });

export function getTestResultLibrary() {
  const data = {};
  data["pageIndex"] = 1;
  data["pageSize"] = 10000;
  return request({
    url: '/api/v1/MaterialTestResultLibrary/GetList',
    method: 'get',
    params: data
  })
}

